//
//  WFSettingCell.m
//  谷居
//
//  Created by dllo on 16/6/28.
//  Copyright © 2016年 刘万方. All rights reserved.
//

#import "WFSettingCell.h"
#import "Masonry.h"
@implementation WFSettingCell

/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
    // Drawing code
}
*/
- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier {
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        [self createCell];
    }
    return self;
}


- (void)createCell {
    _leftImage = [[UIImageView alloc] init];
    [self.contentView addSubview:_leftImage];
    [_leftImage release];
    
    
    _rightLabel = [[UILabel alloc] init];
    [self.contentView addSubview:_rightLabel];
    [_rightLabel release];
}

- (void)layoutSubviews {
    [super layoutSubviews];
    [_leftImage mas_remakeConstraints:^(MASConstraintMaker *make) {
        
        make.centerY.equalTo(self.contentView);
        make.left.equalTo(self.contentView).offset(20);
        make.size.mas_equalTo(CGSizeMake(30, 30));
    }];
    
    
    [_rightLabel mas_remakeConstraints:^(MASConstraintMaker *make) {
        make.centerY.equalTo(self.contentView);
        make.left.equalTo(_leftImage.mas_right).offset(20);
        make.size.mas_equalTo(CGSizeMake(100, 20));
        
    }];
}


- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
}
- (void)setHighlighted:(BOOL)highlighted animated:(BOOL)animated {
    
}
@end
